package com.meihua.mes2ehr.entity;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@NoArgsConstructor
@Data
public class FsMesSheetResult {

    @JsonProperty("code")
    private Integer code;
    @JsonProperty("data")
    private DataDTO data;
    @JsonProperty("msg")
    private String msg;

    @NoArgsConstructor
    @Data
    public static class DataDTO {
        @JsonProperty("properties")
        private PropertiesDTO properties;
        @JsonProperty("sheets")
        private List<SheetsDTO> sheets;
        @JsonProperty("spreadsheetToken")
        private String spreadsheetToken;

        @NoArgsConstructor
        @Data
        public static class PropertiesDTO {
            @JsonProperty("ownerUser")
            private Long ownerUser;
            @JsonProperty("revision")
            private Integer revision;
            @JsonProperty("sheetCount")
            private Integer sheetCount;
            @JsonProperty("title")
            private String title;
        }

        @NoArgsConstructor
        @Data
        public static class SheetsDTO {
            @JsonProperty("columnCount")
            private Integer columnCount;
            @JsonProperty("frozenColCount")
            private Integer frozenColCount;
            @JsonProperty("frozenRowCount")
            private Integer frozenRowCount;
            @JsonProperty("index")
            private Integer index;
            @JsonProperty("merges")
            private List<MergesDTO> merges;
            @JsonProperty("rowCount")
            private Integer rowCount;
            @JsonProperty("sheetId")
            private String sheetId;
            @JsonProperty("title")
            private String title;

            @NoArgsConstructor
            @Data
            public static class MergesDTO {
                @JsonProperty("columnCount")
                private Integer columnCount;
                @JsonProperty("rowCount")
                private Integer rowCount;
                @JsonProperty("startColumnIndex")
                private Integer startColumnIndex;
                @JsonProperty("startRowIndex")
                private Integer startRowIndex;
            }
        }
    }
}
